package com.tyx.chargingpile.service.exception;

import com.tyx.chargingpile.Enum.ServiceExceptionEume;

/**
 * socket通讯业务异常
 */
public class ServiceExcep extends Exception {

    /**
     * 错误代码
     */
    private Integer code;

    /**
     * 错误消息
     */
    private String msg;

    /**
     * 报文信息
     */
    private String data;

    /** 报文信息 */
    public String getData() {
        return data;
    }

    /** 报文信息 */
    public void setData(String data) {
        this.data = data;
    }

    /** 错误代码 */
    public Integer getCode() {
        return code;
    }

    /** 错误代码 */
    public void setCode(Integer code) {
        this.code = code;
    }

    /** 错误消息 */
    public String getMsg() {
        return msg;
    }

    /** 错误消息 */
    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ServiceExcep(ServiceExceptionEume eume){
        this.code = eume.getCode();
        this.msg = eume.getMesg();
    }
    public ServiceExcep(ServiceExceptionEume eume, String data){
        this.code = eume.getCode();
        this.msg = eume.getMesg();
        this.data = data;
    }
}
